package org.eddycar.jproyeddycar.contrato.dao;

import java.util.List;
import org.eddycar.jproyeddycar.dao.*;
import org.eddycar.jproyeddycar.contrato.modelo.*;

public class DaoContrato extends JpaDao<String, ContratoCompraVenta> {


    @Override
    public ContratoCompraVenta buscarId(String id) {
        return getEm().find(ContratoCompraVenta.class, id);
    }
    public List<ContratoCompraVenta> buscarPorCedula(String cedula){
        return getEm().createQuery("SELECT c FROM ContratoCompraVenta c WHERE c.id like'%"+cedula+"%'").getResultList();
    }

}
